package com.it.xuehang.controller;

import com.it.xuehang.service.impl.WeatherSyncService;
import com.it.xuehang.util.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 昨天天气信息表 前端控制器
 * </p>
 *
 * @author xuehang
 * @since 2024-12-12
 */
@RestController
@RequestMapping("/weather")
public class WeatherController {
    @Autowired
    private WeatherSyncService weatherSyncService;

   @GetMapping("/get")
    public ResponseResult<Void> get(){
       weatherSyncService.syncWeatherData();
       return new ResponseResult<>(200,"success");
   }


}
